<?php include 'header-inc.php'; ?>

    <div id="inner-wrap">
        <div id="sidebar">
<?php include 'sidebar-inc.php'; ?>

        </div>
        <div id="content-box">
            <div class="inner-box">
                <div class="cmd">
                    <ul>
                        <li><a href="<?php echo $this->_url('user', null, array(array(FLEA::getAppInf( 'columnAccessor' )=>$_GET[FLEA::getAppInf( 'columnAccessor' )]))); ?>">返回列表</a></li>
                    </ul>
                </div>
                <?php if(!$data['group']): ?>
                <span class="tips">尚未添加用户组，请先<a href="<?php echo $this->_url($_GET[FLEA::getAppInf( 'controllerAccessor' )], 'addgroup', array(array(FLEA::getAppInf( 'columnAccessor' ) => $_colkey))); ?>">添加用户组</a>。</span>
                <?php endif; ?>
                <div class="formbox box">
                <form method="post" action="<?php echo $this->_url('user', 'save'); ?>">
                    <h3>用户</h3>
                    <table>
                        <tr>
                            <th>所属用户组：</th>
                            <td><?php $this->getControl('DropdownList', 'group_id', array('items'=>$data['group'], 'selected'=>$data['row']['group_id'])); ?></td>
                        </tr>
                        <tr>
                            <th>用户名：</th>
                            <td><input type="text" id="username" name="username" value="<?php echo h($data['row']['username']); ?>" /></td>
                        </tr>
                        <tr>
                            <th>用户密码：</th>
                            <td><input type="password" id="password" name="password" value="" /></td>
                        </tr>
                        <tr>
                            <th>用户邮箱：</th>
                            <td><input type="text" id="email" name="email" value="<?php echo h($data['row']['email']); ?>" /></td>
                        </tr>
                        <?php 
                        $items = array(
                            '启用'=>0,
                            '停用'=>1,
                        );
                        ?>
                        <tr>
                            <th>是否启用：</th>
                            <td><?php $this->getControl('RadioGroup', 'islocked', array('items'=>$items, 'selected'=>$data['row']['islocked'])); ?></td>
                        </tr>
                        <tr>
                            <th></th>
                            <td><input type="submit" value="保 存" /> <input type="reset" value="重 置" /></td>
                        </tr>
                    </table>
                    <input type="hidden" id="user_id" name="user_id" value="<?php echo $data['row']['user_id']; ?>" />
                    <input type="hidden" id="site_id" name="site_id" value="<?php echo $_GET['site']; ?>" />
                </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>